Skip to main content

Radio

Description

<jp-radio> is an enhanced form component with the functionality of selecting a single choice from multiple options.


Attributes

NameRequiredTypeDescription
valuestringsetter and getter
optionsArray<{name?: string, value: any, disabled?: boolean;}>select options
namestringname of the form control
inlinebooleanrow/columns
requiredbooleandetermines if a selection is required
requiredValidationMessagestringvalidation message for when component does not satisfy required


Slots

This component does not have any slots.



Methods

  • getValue
    • returns form field value
  • reportValidity
    • triggers reportValidity


Events

  • value
    • triggers when item is selected


Demo

Live Editor
// import '@jaspero/web-components/radio.wc.js';
// import '@jaspero/web-components/radio.css';

<jp-radio options='[{"value": "aaa"}, {"name": "bcb", "value":"bbb"}, {"value":"ccc"}]'></jp-radio>
Result
Loading...